package org.cy.websocket.stomp.util;

/**
 * String Toolkit.
 *
 * created in 2021/5/14
 *
 * @author cao.yong
 */
public class StringKit {

    public static String join(String delimiter, CharSequence... sequences) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < sequences.length; i++) {
            builder.append(sequences[i]);
            if (i < sequences.length - 1) {
                builder.append(delimiter);
            }
        }
        return builder.toString();
    }

    public static boolean isEmpty(String str) {
        return (null == str || str.length() == 0);
    }

    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }
}
